package com.twopai.framelibrary.entity;

import android.os.Parcel;
import android.os.Parcelable;


import java.util.List;

public class KDItemEntity {
    @Override
    public String toString() {
        return "KDItemEntity{" +
                "page=" + page +
                ", list=" + list +
                '}';
    }

    /**
     * list : [{"id":2,"cover":"http://djcprduct-dev.oss-cn-hangzhou.aliyuncs.com/news/cover/a5824a1658187475388516c4e5e99560.jpg","title":"习近平会见捷克总统泽曼","operate_id":1,"created_at":"2019-04-28 18:45:09","updated_at":"2019-04-28 18:45:09","type":1,"author":"admin"}]
     * page : {"current_page":2,"first_page_url":"http://app.99djc.com/api/newsList?page=1","from":2,"last_page":2,"last_page_url":"http://app.99djc.com/api/newsList?page=2","next_page_url":"","path":"http://app.99djc.com/api/newsList","per_page":1,"prev_page_url":"http://app.99djc.com/api/newsList?page=1","to":2,"total":2}
     */

    private PageBean page;
    private List<ListBean> list;

    public PageBean getPage() {
        return page;
    }

    public void setPage(PageBean page) {
        this.page = page;
    }

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public static class PageBean {
        @Override
        public String toString() {
            return "PageBean{" +
                    "current_page=" + current_page +
                    ", first_page_url='" + first_page_url + '\'' +
                    ", from=" + from +
                    ", last_page=" + last_page +
                    ", last_page_url='" + last_page_url + '\'' +
                    ", next_page_url='" + next_page_url + '\'' +
                    ", path='" + path + '\'' +
                    ", per_page=" + per_page +
                    ", prev_page_url='" + prev_page_url + '\'' +
                    ", to=" + to +
                    ", total=" + total +
                    '}';
        }

        /**
         * current_page : 2
         * first_page_url : http://app.99djc.com/api/newsList?page=1
         * from : 2
         * last_page : 2
         * last_page_url : http://app.99djc.com/api/newsList?page=2
         * next_page_url :
         * path : http://app.99djc.com/api/newsList
         * per_page : 1
         * prev_page_url : http://app.99djc.com/api/newsList?page=1
         * to : 2
         * total : 2
         */

        private int current_page;
        private String first_page_url;
        private int from;
        private int last_page;
        private String last_page_url;
        private String next_page_url;
        private String path;
        private int per_page;
        private String prev_page_url;
        private int to;
        private int total;

        public int getCurrent_page() {
            return current_page;
        }

        public void setCurrent_page(int current_page) {
            this.current_page = current_page;
        }

        public String getFirst_page_url() {
            return first_page_url;
        }

        public void setFirst_page_url(String first_page_url) {
            this.first_page_url = first_page_url;
        }

        public int getFrom() {
            return from;
        }

        public void setFrom(int from) {
            this.from = from;
        }

        public int getLast_page() {
            return last_page;
        }

        public void setLast_page(int last_page) {
            this.last_page = last_page;
        }

        public String getLast_page_url() {
            return last_page_url;
        }

        public void setLast_page_url(String last_page_url) {
            this.last_page_url = last_page_url;
        }

        public String getNext_page_url() {
            return next_page_url;
        }

        public void setNext_page_url(String next_page_url) {
            this.next_page_url = next_page_url;
        }

        public String getPath() {
            return path;
        }

        public void setPath(String path) {
            this.path = path;
        }

        public int getPer_page() {
            return per_page;
        }

        public void setPer_page(int per_page) {
            this.per_page = per_page;
        }

        public String getPrev_page_url() {
            return prev_page_url;
        }

        public void setPrev_page_url(String prev_page_url) {
            this.prev_page_url = prev_page_url;
        }

        public int getTo() {
            return to;
        }

        public void setTo(int to) {
            this.to = to;
        }

        public int getTotal() {
            return total;
        }

        public void setTotal(int total) {
            this.total = total;
        }
    }

    public static class ListBean implements Parcelable{
        @Override
        public String toString() {
            return "ListBean{" +
                    "id=" + id +
                    ", cover='" + cover + '\'' +
                    ", title='" + title + '\'' +
                    ", operate_id=" + operate_id +
                    ", created_at='" + created_at + '\'' +
                    ", updated_at='" + updated_at + '\'' +
                    ", type=" + type +
                    ", author='" + author + '\'' +
                    '}';
        }

        /**
         * id : 2
         * cover : http://djcprduct-dev.oss-cn-hangzhou.aliyuncs.com/news/cover/a5824a1658187475388516c4e5e99560.jpg
         * title : 习近平会见捷克总统泽曼
         * operate_id : 1
         * created_at : 2019-04-28 18:45:09
         * updated_at : 2019-04-28 18:45:09
         * type : 1
         * author : admin
         */


        private int id;
        private String cover;
        private String title;
        private int operate_id;
        private String created_at;
        private String updated_at;
        private int type;
        private String author;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getCover() {
            return cover;
        }

        public void setCover(String cover) {
            this.cover = cover;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public int getOperate_id() {
            return operate_id;
        }

        public void setOperate_id(int operate_id) {
            this.operate_id = operate_id;
        }

        public String getCreated_at() {
            return created_at;
        }

        public void setCreated_at(String created_at) {
            this.created_at = created_at;
        }

        public String getUpdated_at() {
            return updated_at;
        }

        public void setUpdated_at(String updated_at) {
            this.updated_at = updated_at;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getAuthor() {
            return author;
        }

        public void setAuthor(String author) {
            this.author = author;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.id);
            dest.writeString(this.cover);
            dest.writeString(this.title);
            dest.writeInt(this.operate_id);
            dest.writeString(this.created_at);
            dest.writeString(this.updated_at);
            dest.writeInt(this.type);
            dest.writeString(this.author);
        }

        public ListBean() {
        }

        protected ListBean(Parcel in) {
            this.id = in.readInt();
            this.cover = in.readString();
            this.title = in.readString();
            this.operate_id = in.readInt();
            this.created_at = in.readString();
            this.updated_at = in.readString();
            this.type = in.readInt();
            this.author = in.readString();
        }

        public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
            @Override
            public ListBean createFromParcel(Parcel source) {
                return new ListBean(source);
            }

            @Override
            public ListBean[] newArray(int size) {
                return new ListBean[size];
            }
        };
    }
}
